<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /* var num = prompt('请输入你的分数');
        if (num >= 90){
            alert('A');
        }else if (num >= 80){
            alert('B');
        }else if (num >= 70){
            alert('C');
        }else if (num >= 60){
            alert('D');
        }else {
            alert('E');
        } */

        var num = prompt('请输入你的分数');
        var num = +parseInt(num / 10);
        switch (num){
           case 9: 
                alert('A');
                break;
           case 8: 
                alert('B');
                break;
           case 7: 
                alert('C');
                break;
           case 6: 
                alert('D');
                break;
            default:
                alert('E')
        }
    </script>
</body>
</html>